/// createTime : "2023-10-19 14:22:52"
/// id : 34483
/// projectName : "HbA1c"
/// curveBatchNo : ""
/// sample : ""
/// resultUnit : ""
/// resultDisplay : ""
/// result : "16"
/// scale : ""
/// resultAfterHandle : "12"
/// deviceNo : "230329091093"
/// time : "2023-10-13 10:28:52"
/// identityCode : ""
/// patientId : ""
/// position : "113.5,39.6"
/// startTime : ""
/// endTime : ""
/// lower : ""
/// upper : ""
/// referLower : "3.8"
/// referUpper : "5.8"
/// maxId : ""
/// userPhone : "13223443123"
/// patientIdCard : "130633198510082371"
/// patientName : ""
/// patientPhone : ""

class HistoryRecordEntity {
  bool isChecked = false;

  HistoryRecordEntity({
    this.createTime,
    this.id,
    this.projectName,
    this.curveBatchNo,
    this.sample,
    this.resultUnit,
    this.resultDisplay,
    this.result,
    this.scale,
    this.resultAfterHandle,
    this.deviceNo,
    this.time,
    this.identityCode,
    this.patientId,
    this.serialNo,
    this.position,
    this.startTime,
    this.endTime,
    this.lower,
    this.upper,
    this.referLower,
    this.referUpper,
    this.maxId,
    this.userPhone,
    this.patientIdCard,
    this.patientName,
    this.patientPhone,
    this.patientSex,
    this.patientAge,
  });

  HistoryRecordEntity.fromJson(dynamic json) {
    createTime = json['createTime'];
    id = json['id'];
    projectName = json['projectName'];
    curveBatchNo = json['curveBatchNo'];
    sample = json['sample'];
    resultUnit = json['resultUnit'];
    resultDisplay = json['resultDisplay'];
    result = json['result'];
    scale = json['scale'];
    resultAfterHandle = json['resultAfterHandle'];
    deviceNo = json['deviceNo'];
    time = json['time'];
    identityCode = json['identityCode'];
    patientId = json['patientId'];
    position = json['position'];
    startTime = json['startTime'];
    endTime = json['endTime'];
    lower = json['lower'];
    upper = json['upper'];
    referLower = json['referLower'];
    referUpper = json['referUpper'];
    maxId = json['maxId'];
    userPhone = json['userPhone'];
    patientIdCard = json['patientIdCard'];
    serialNo = json['serialNo'];
    patientName = json['patientName'];
    patientPhone = json['patientPhone'];
    patientSex = json['patientSex'];
    patientAge = json['patientAge'];
  }

  String? createTime;
  num? id;
  String? projectName;
  String? curveBatchNo;
  String? sample;
  String? resultUnit;
  String? resultDisplay;
  String? result;
  num? scale;
  String? resultAfterHandle;
  String? deviceNo;
  String? time;
  String? identityCode;
  String? patientId;
  String? position;
  String? startTime;
  String? endTime;
  String? lower;
  String? upper;
  String? referLower;
  String? referUpper;
  num? maxId;
  String? userPhone;
  String? patientIdCard;
  String? serialNo;
  String? patientName;
  String? patientPhone;
  String? patientSex;
  String? patientAge;

  HistoryRecordEntity copyWith({
    String? createTime,
    num? id,
    String? projectName,
    String? curveBatchNo,
    String? sample,
    String? resultUnit,
    String? resultDisplay,
    String? result,
    num? scale,
    String? resultAfterHandle,
    String? deviceNo,
    String? time,
    String? identityCode,
    String? patientId,
    String? position,
    String? startTime,
    String? endTime,
    String? lower,
    String? upper,
    String? referLower,
    String? referUpper,
    num? maxId,
    String? userPhone,
    String? patientIdCard,
    String? serialNo,
    String? patientName,
    String? patientPhone,
    String? patientSex,
    String? patientAge,
  }) =>
      HistoryRecordEntity(
        createTime: createTime ?? this.createTime,
        id: id ?? this.id,
        projectName: projectName ?? this.projectName,
        curveBatchNo: curveBatchNo ?? this.curveBatchNo,
        sample: sample ?? this.sample,
        resultUnit: resultUnit ?? this.resultUnit,
        resultDisplay: resultDisplay ?? this.resultDisplay,
        result: result ?? this.result,
        scale: scale ?? this.scale,
        resultAfterHandle: resultAfterHandle ?? this.resultAfterHandle,
        deviceNo: deviceNo ?? this.deviceNo,
        time: time ?? this.time,
        identityCode: identityCode ?? this.identityCode,
        patientId: patientId ?? this.patientId,
        position: position ?? this.position,
        startTime: startTime ?? this.startTime,
        endTime: endTime ?? this.endTime,
        lower: lower ?? this.lower,
        upper: upper ?? this.upper,
        referLower: referLower ?? this.referLower,
        referUpper: referUpper ?? this.referUpper,
        maxId: maxId ?? this.maxId,
        userPhone: userPhone ?? this.userPhone,
        patientIdCard: patientIdCard ?? this.patientIdCard,
        serialNo: serialNo ?? this.serialNo,
        patientName: patientName ?? this.patientName,
        patientPhone: patientPhone ?? this.patientPhone,
        patientSex: patientSex ?? this.patientSex,
        patientAge: patientAge ?? this.patientAge,
      );

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['createTime'] = createTime;
    map['id'] = id;
    map['projectName'] = projectName;
    map['curveBatchNo'] = curveBatchNo;
    map['sample'] = sample;
    map['resultUnit'] = resultUnit;
    map['resultDisplay'] = resultDisplay;
    map['result'] = result;
    map['scale'] = scale;
    map['resultAfterHandle'] = resultAfterHandle;
    map['deviceNo'] = deviceNo;
    map['time'] = time;
    map['identityCode'] = identityCode;
    map['patientId'] = patientId;
    map['position'] = position;
    map['startTime'] = startTime;
    map['endTime'] = endTime;
    map['lower'] = lower;
    map['upper'] = upper;
    map['referLower'] = referLower;
    map['referUpper'] = referUpper;
    map['maxId'] = maxId;
    map['userPhone'] = userPhone;
    map['patientIdCard'] = patientIdCard;
    map['serialNo'] = serialNo;
    map['patientName'] = patientName;
    map['patientPhone'] = patientPhone;
    map['patientSex'] = patientSex;
    map['patientAge'] = patientAge;
    return map;
  }
}
